// import { lazy } from "react";
import { createBrowserRouter } from "react-router-dom";
import LayoutView from "@/page/layout/LayoutView";
import HomePage from "@/page/homePage/HomePage";
import MyFavorite from "@/page/myFavorite/MyFavorite";
// 打包优化，路由懒加载
// const HomePage = lazy(() => import('@/page/homePage/HomePage'))
// const MyFavorite = lazy(() => import('@/page/myFavorite/MyFavorite'))
// const LayoutView = lazy(() => import('@/page/layout/LayoutView'))
export  const router = createBrowserRouter([
    {
        path: '/',
        element: <LayoutView/>,
        children: [
            { 
                index: true,
                element:<HomePage/>
            },
            {
                path: 'myFavorite',
                element:<MyFavorite/>
            }
        ]
    },
])
 